<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('菜单管理')" />
</head>
<body>
<div class="wrapper">
    <form role="form" style="font-size: 12px" id="form">
        <div class="box-body">
            <div class="form-group">
                <label>昵称</label>
                <input type="text" class="form-control input-sm" name="nickname">
            </div>
            <div class="form-group">
                <label>登录名称</label>
                <input type="text" class="form-control input-sm" name="username">
            </div>
            <div class="form-group">
                <label>邮箱</label>
                <input type="text" class="form-control input-sm" name="email" autocomplete='email'>
            </div>
            <div class="form-group">
                <label>手机</label>
                <input type="text" class="form-control input-sm" name="phonenumber" autocomplete='tel'>
            </div>
            <div class="form-group">
                <label>角色</label>
                <select class="form-control input-sm selectpicker" multiple id="role">
                    <option th:each="role : ${roleList}" th:value="${role.roleId}" th:text="${role.roleName}"></option>
                </select>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var prefix = "/system/user";
    $(function() {
    });
    function submitHandler() {
        if ($.validate.form()) {
            var json = $.common.formToJSON('form');
            json.roleIds = $('#role').val().join();
            $.operate.save(prefix + '/save', json);
        }
    }
</script>
</body>
</html>
